package com.tyk.bookstore.back.logistics.model.query;

import com.tyk.bookstore.back.logistics.model.constant.ExpressCompanyValidateConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author tyk
 * @description 快递公司
 */
@Data
@Schema(name = "ExpressCompanyAddQuery", description = "快递公司")
public class ExpressCompanyAddQuery implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "简称")
    @NotBlank
    @Size(min = ExpressCompanyValidateConstant.BRIEF_NAME_MIN_LENGTH, max = ExpressCompanyValidateConstant.BRIEF_NAME_MAX_LENGTH)
    @Pattern(regexp = ExpressCompanyValidateConstant.BRIEF_NAME_REGEXP)
    private String briefName;

    @Schema(description = "公司名称")
    @NotBlank
    @Size(min = ExpressCompanyValidateConstant.FULL_NAME_MIN_LENGTH, max = ExpressCompanyValidateConstant.FULL_NAME_MAX_LENGTH)
    @Pattern(regexp = ExpressCompanyValidateConstant.FULL_NAME_REGEXP)
    private String fullName;

    @Schema(description = "收费[单位：元/千克]")
    @NotNull
    @Min(value = 0)
    private BigDecimal charge;

    @Schema(description = "描述")
    @NotBlank
    @Size(min = ExpressCompanyValidateConstant.DESCRIPTION_MIN_LENGTH, max = ExpressCompanyValidateConstant.DESCRIPTION_MAX_LENGTH)
    @Pattern(regexp = ExpressCompanyValidateConstant.DESCRIPTION_REGEXP)
    private String description;

}
